<template lang="pug">
  keep-alive
    kalix-table(bizKey="vote" title='投票列表' ref="kalixTable"
    v-bind:tableFields="tableFields"
    v-bind:targetURL="voteURL"
    v-bind:bizDialog="voteDialog"
    v-bind:btnList="voteBtnList"
    v-bind:buttonPermissionPrefix="buttonPermissionPrefix"
    v-bind:toolbarBtnList="toolbarBtnList"
    )
</template>

<script type="text/ecmascript-6">
  import {MpliveVoteURL, voteBtnPermissionPrefix} from '../../config.toml'
  import {voteConfigBtnList} from './config'

  export default {
    name: 'kalix-mplive-vote',
    data() {
      return {
        voteURL: MpliveVoteURL,
        tableFields: [
          {prop: 'votetitle', label: '投票主题'},
          {prop: 'option1', label: '选项一'}
        ],
        voteDialog: [
          {id: 'add', dialog: 'VoteAdd'},
          {id: 'view', dialog: 'VoteView'},
          {id: 'edit', dialog: 'VoteEdit'}
        ],
        voteBtnList: voteConfigBtnList,
        buttonPermissionPrefix: voteBtnPermissionPrefix,
        toolbarBtnList: [
          {id: 'add', isShow: true, title: '添加', isPermission: true}
        ]
      }
    }
  }
</script>

<style scoped lang="stylus">

</style>
